<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-18 21:19:33
 * @LastEditTime: 2023-07-28 10:00:43
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: 
 */

namespace App\Http\Controllers\BaseData;

use App\Http\Controllers\Controller;
use App\Http\Services\BaseData\CompanyCategoryService;
use App\Http\Services\BaseData\CompanyService;
use Illuminate\Http\Request;

class CompanyController extends Controller
    {
    //
    public $categoryservice;
    public function __construct(CompanyService $company_service, CompanyCategoryService $categoryservice)
        {
        $this->service         = $company_service;
        $this->categoryservice = $categoryservice;
        }

    public function list()
        {
        return $this->service->list();
        }

    public function companylist()
        {
        return $this->service->companylist();
        }

    protected function save(Request $request)
        {
        return $this->service->save($request);
        }
    protected function delete(Request $request)
        {
        return $this->service->delete($request);
        }
    public function categorylist()
        {
        return $this->categoryservice->list();
        }
    protected function categorydelete(Request $request)
        {
        return $this->categoryservice->delete($request);
        }
    protected function categorysave(Request $request)
        {
        return $this->categoryservice->save($request);
        }

    protected function deptcust()
        {
        return $this->service->deptcust(1);
        }
    protected function nodeptcust()
        {
        return $this->service->deptcust(0);
        }
    protected function linkmanAdd()
        {
        return $this->service->linkmanAdd();
        }
    public function linkmanGet()
        {
        return $this->service->linkmanGet();
        }

    }